package scatours.client.impl;

import org.oasisopen.sca.annotation.Reference;
import org.oasisopen.sca.annotation.Service;

import com.tuscanyscatours.SCAToursBooking;
import com.tuscanyscatours.SCAToursCart;
import com.tuscanyscatours.SCAToursSearch;
import com.tuscanyscatours.common.TripItem;
import com.tuscanyscatours.common.TripLeg;



@Service(Runnable.class)
public class TestClientImpl {
		@Reference
		protected SCAToursBooking scaToursBooking;
		@Reference
		protected SCAToursCart scaToursCart;
		@Reference
		protected SCAToursSearch scaToursCatalog;
		
		String cartId;

	
	public void run(){
//		String bookingCode= bookings.newBooking("FS1APR4", 1);
//		System.out.println("Booking code is "+ bookingCode);
//		checkout.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10");
		init();
	}
	public void init(){
		String newCart= scaToursCart.newCart();
		System.out.println("new Cart: "+ newCart);

		//TripLeg tripLeg= new TripLeg("1", "LGW", "FLR", "06/12/09", "13/12/09", "2");
		
//		TripItem[] result= scaToursCatalog.search(tripLeg);
////		for(TripItem item : result){
////			System.out.println(item.getName());
////		}
		
		
		
	}

}

